
<div id="message">
	<?php  if(isset($message))
		{						
			echo $message.'<br>';
		}
	?>
</div>

   <div class="user_item">
        <div class="control">
            <p><a href="<?php echo  $backend; ?>add_product"><img src="<?php echo $backendimg; ?>addnew_product.jpg"> </a></p>
            <p><a href="<?php echo  $backend; ?>add_product">Add New</a></p>
        </div>                
        <div class="control">
            <p><a href="<?php echo  $backend; ?>remove_product"><img src="<?php echo $backendimg; ?>recycle_bin.png"> </a></p>
            <p><a href="<?php echo  $backend; ?>remove_product">Products Removed</a></p>
        </div> 		
   </div>
</div>   
<div class="clear"> </div>

		<?php

			
		$this->table->set_heading(array('label','image', 'name', 'price', 'description',	
		 'category',	'viewed', 'post_at', 'restore', 'delete'));
		$tmpl = array ( 'table_open'  => '<table  id="table_admin">' );
				 
		$this->table->set_template($tmpl);
		foreach ($products_removed as $p) {	
		
		$label 		 = array('data'=>$p['product_label'], 'class'=>'product label');
		$image 		 = array('data'=>'<img src="'.base_url().'public/images/'.$p['product_image'].'" width="100">', 'class'=>'product image');
		$name 		 = array('data'=>$p['product_name'], 'class'=>'product name');
		$price 		 = array('data'=>$p['product_price'], 'class'=>'product price');
		$description = array('data'=>word_limiter($p['product_description'],10), 'class'=>'product description');
		$catname 	 = array('data'=>$p['category_name'], 'class'=>'product catname');
		$view   	 = array('data'=>$p['no_of_time_viewed'], 'class'=>'product view');
		$post   	 = array('data'=>unix_to_human((int)$p['post_at']), 'class'=>'product post');
		$restore 	 = array('data'=>'<a href="'.$backend.'func_restore_product/'.$p['product_id'].'"><img src="'.$backendimg.'restore.jpg" widht="30" height="30" ></a>', 'class'=>'product restore');
		$delete 	 = array('data'=>'<a href="'.$backend.'func_delete_product/'.$p['product_id'].'"><img src="'.$backendimg.'delete.png" widht="23" height="23" ></a>', 'class'=>'product delete');
		

		$this->table->add_row(array(  $label, $image, $name, $price, $description ,
			 $catname,	$view, $post , $restore, $delete ));
		}
		echo $this->table->generate(); 	
		

	
		?>
	
	
